package DB_operation

import (
	"time"
)

// 用户信息表
type UserInfo struct {
	UserId       uint64 `gorm:"column:id;primary_key;auto_increment" json:"user_id"`
	UserPassword string `gorm:"cloumn:password;not null" json:"password"`
	UserName     string `gorm:"column:user_name;not null" json:"username"form:"" validate:"required,stu_name"`
	UserAge      uint8  `gorm:"column:user_age;not null" json:"userage" binding:"gte=0,lte=150"`
	UserEmail    string `gorm:"column:user_email;not null" json:"email"`
	UserSex      string `gorm:"column:user_sex; not null" json:"usersex" `
	UserAddress  string `gorm:"column:user_address;not null" json:"useraddress"`
	// 默认字段，创建的时候，自动填充时间
	CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
	//enable  int
}

// 行业-编号
type IndustryCode struct {
	Industry string `gorm:"cloumn:industry"`
	Code     uint64 `gorm:"cloumn:code;primary_key"`
}

// 方向-编号
type DirectionCode struct {
	Industrycode string `gorm:"cloumn:direction"` //行业编号
	Direction    string `gorm:"cloumn:direction"` //方向
	Code         uint64 `gorm:"cloumn:code;primary_key"`
}

// 职位-编号
type ProfessionCode struct {
	Directioncode string `gorm:"cloumn:direction"`
	Profession    string `gorm:"cloumn:profession"`
	Codes         uint64 `gorm:"cloumn:code;primary_key"`
}

/*// 职业-菜单
type GobMenu struct {
	Industry   uint64 `gorm:"column:industry;" json:"id"`
	Direction  uint64 `gorm:"column:direction"json:"direction"`
	Profession uint64 `gorm:"column:profession"json:"profession"`
}

// 职位-要求
type GobRequset struct {
	ProfessionCode   uint64 `gorm:"column:profession_code;primary_key"json:"profession"`
	MajorRequset     uint64 `gorm:"column:industry;" json:"id"`
	EducationRequset uint64 `gorm:"column:direction"`
}

// 专业-编号
type MajorCode struct {
	Major string `gorm:"cloumn:major"`
	Code  uint64 `gorm:"cloumn:code;primary_key"`
}

// 学历-编号
type EducationCode struct {
	Industry string `gorm:"cloumn:industry"`
	Code     uint64 `gorm:"cloumn:code;primary_key"`
}*/
// 保存评论	context内容
type Comment struct {
	UserId    uint64    `gorm:"column:user_id;not null"json:"user_id"`
	CommentId uint64    `gorm:"column:comment_id;primary_key;auto_increment" json:"commentid"`
	Content   string    `gorm:"column:content;not null"json:"content"`
	CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
}
